<?php

namespace Auth\Form;
use Zend\InputFilter\InputFilter;

class LoginFilter extends InputFilter
{
    public function __construct() {
        $this->add(array(
            'name' => 'username' ,
            'required' => true ,
            'validators' => array(
                array(
                    'name' =>'NotEmpty', 
                    'options' => array(
                        'messages' => array(
                            \Zend\Validator\NotEmpty::IS_EMPTY => 'Please enter User Name!' 
                        ),
                    ),
                ),
                /*array(
                    'name' => 'StringLength' ,
                    'options' => array(
                        'min' => 6 ,
                        'messages' => array(
                            'stringLengthTooShort' => 'User must 6 character' ,
                        )
                    ),
                ),*/
            ), 
        ));
        
        $this->add(array(
            'name' => 'password' ,
            'required' => true ,
        ));
        
    }
}